﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Data.SqlClient;

namespace CitizenDiary.Sync.Shared
{
    public static class Helper
    {
        public static string GetConnectionString(string database)
        {
            return string.Format("Data Source=.;Initial Catalog={0};Persist Security Info=True;User ID=sa;Password=P@ssw0rd123", database);
        }

        public static SqlConnection CreateConnection(string database)
        {
            var conn = new SqlConnection(GetConnectionString(database));
            conn.Open();
            return conn;
        }
    }
}
